package net.rlair.sbdemo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Order(2)
@Component
public class Lixudong2 {

    @Pointcut("execution(* net.rlair.sbdemo.controller.ZhaozichenController.list(..))")
    public void manyAspects() {
    }

    @Before("manyAspects()")
    public void before() {
        System.out.println("before");
    }

    @After("manyAspects()")
    public void after() {
        System.out.println("after");
    }

    @AfterThrowing("manyAspects()")
    public void afterThrowing() {
        System.out.println("afterThrowing");
    }

}
